/**
 * 
 */
package parser;

import java.util.HashMap;

/**
 * @author greg
 * Stores the variables that the script sets
 */
public class Memory {
	private HashMap<String,MemoryItem> mem;
	
	
	public Memory() {
		mem = new HashMap<String,MemoryItem>();
	}
	
	public Object assign(String name, Object val) {
		
		
		return mem.put(name, new MemoryItem(val));
	}
	
	public Object get(String name) {
		return mem.get(name).getValue();
	}
	

	
	

	
}